import 'package:dio/dio.dart';

class HttpLogInteceptor extends InterceptorsWrapper {
  @override
  void onRequest(RequestOptions options, RequestInterceptorHandler handler) {
    print("------request------>");
    print("path:${options.uri}");
    print("method:${options.method}");
    print("data:${options.data}");
    print("<------request------");
    super.onRequest(options, handler);
  }

  @override
  void onResponse(Response response, ResponseInterceptorHandler handler) {
    print("------response------>");
    print("path:${response.realUri}");
    print("headers:${response.headers.toString()}");
    print("statusCode:${response.statusCode}");
    print("statusMessage:${response.statusMessage}");
    print("data:${response.data}");
    print("<------response------");
    super.onResponse(response, handler);
  }
}
